package rui.game.listerner;

import lombok.Setter;
import rui.game.move.Move;
import rui.game.move.MoveStrategy;

import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

public class KeyType extends KeyAdapter {
    @Setter
    private MoveStrategy moveStrategy;

    public KeyType(MoveStrategy moveStrategy) {
        this.moveStrategy = moveStrategy;
    }

    @Override
    public void keyTyped(KeyEvent e) {
        char ch = e.getKeyChar();

        Move thisMoveEvent = moveStrategy.strategy(ch);
        //TODO what？
    }
}